/**
 * @copyright   2010-2017, The Titon Project
 * @license     http://opensource.org/licenses/BSD-3-Clause
 * @link        http://titon.io
 */

@include export("input-group") {
    $titon-input-group-class-addon: generate-class-name($titon-input-group, "addon");

    #{generate-class-name($titon-input-group)} {
        display: inline-flex;
        vertical-align: middle;

        > * {
            flex-grow: 1;
            position: relative;
            border-radius: 0;
            white-space: nowrap;
            height: auto;

            &:hover { z-index: 1; }
            &:focus { z-index: 2; }
        }
    }

    #{$titon-input-group-class-addon} {
        @extend %placeholder-inline-block;
        line-height: normal;
        @include size-medium;
    }

    //-------------------- Sizes --------------------//

    @include generate-size-small($titon-input-group-class-addon) { @include size-small; }
    @include generate-size-large($titon-input-group-class-addon) { @include size-large; }
}
